<template>
	<view class="goods">
		<view class="bannerBox">
			<image src="https://cloudcdn.noitom.com.cn/noitom2/billiard/goods_banner.png" class="banner"></image>
			<view class="box">
				<view class="num"><text>{{integral}}</text>积分</view>
				<view class="tips">消费1元兑换1积分</view>
			</view>
		</view>
		<view class="title">积分兑换</view>
	</view>
</template>

<script>
	import {
		getGoods
	} from "@/api/getData.js";
	export default {
		data() {
			return {
				integral: 0,
				goods: []
			}
		},
		onLoad() {
			this.getGoods()
		},
		methods: {

			//用户详情
			async getGoods() {
				const {
					data: res
				} = await getGoods()
				this.integral = res.data.integral
				this.goods = res.data.goodsVOS
			}
		}
	}
</script>

<style lang="less">
	.goods {
		padding: 32rpx;

		.bannerBox {
			position: relative;
			text-align: center;
			line-height: 1;

			.banner {
				display: block;
				width: 100%;
				height: 180rpx;
			}
			.box{
				position: absolute;
				width: 100%;
				height: 100%;
				left: 0;
				top: 0;
			}
			.num {
				font-size: 24rpx;
				color: #FEF1D6;
				margin-top: 50rpx;
				margin-bottom: 23rpx;

				text {
					font-size: 48rpx;
					font-weight: bold;
				}
			}

			.tips {
				font-size: 20rpx;
				color: #938F87;
			}
		}
		.title{
			margin-top: 32rpx;
		}
	}
</style>
